package org.jeecg.modules.rental.enums;

import org.jeecg.common.enums.IEnumDict;
import org.jeecg.common.exception.JeecgBootException;

/**
 * @Description: 租车订单类型
 * @author sean
 * @date 2019/12/3
 */
public enum EBikeOrderTypeEnums implements IEnumDict<EBikeOrderTypeEnums> {

    RENTAL_ORDER("1", "租赁订单"),

    RENEW_ORDER("2", "续租订单"),

    OVERTIME_ORDER("3", "超时订单"),

    PREBOOK_ORDER("4", "预约订单");

    private String value;

    private String label;

    EBikeOrderTypeEnums(String value, String label) {
        this.value = value;
        this.label = label;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getKey() {
        return value;
    }

    @Override
    public String getRemark() {
        return null;
    }

    public static EBikeOrderTypeEnums getEnumByValue(String value){
        for(EBikeOrderTypeEnums item: values()){
            if(value.equals(item.value)){
                return item;
            }
        }
        throw new JeecgBootException("没找到对应字典");
    }

}
